package bean;
import java.sql.*;
import bean.dbbean.*;
public class registerbean {
	Connection conn=dbbean.getConn();
	PreparedStatement stmt;
	public boolean register(String name,String password,String user,String email) throws SQLException{
		String mysql="insert into user(name,password,user,email) values(?,?,?,?)";
	     PreparedStatement pst=conn.prepareStatement(mysql);
	     pst.setString(1,name);
	     pst.setString(2,password);
	     pst.setString(3,user);
	     pst.setString(4,email);
	     int result=pst.executeUpdate();
	     if(result>0)
	     {
	        return true;
	     }else
	     {
	      return false;
	     }
	}
}
